Skip to content

fix(usage-metrics): include last release in the legend pop over#3630

Merged
mdelapenya merged 1 commit intotestcontainers:mainfrom
mdelapenya:hide-old-versions
Apr 1, 2026
Merged

fix(usage-metrics): include last release in the legend pop over#3630
mdelapenya merged 1 commit intotestcontainers:mainfrom
mdelapenya:hide-old-versions

Conversation

@mdelapenya
Copy link
Copy Markdown
Member

@mdelapenya mdelapenya commented Apr 1, 2026

What does this PR do?

Two improvements to the usage metrics trend chart:

  1. Hide older versions by default: Only the last 5 releases are visible on the chart. Older versions are hidden but remain in the legend — users can click any legend entry to toggle its visibility.

  2. Fix tooltip for latest release: Switch tooltip mode from index to x so that all datasets with a data point at the hovered date appear in the popover. The index mode matched by internal array position, which missed versions with fewer data points (e.g. v0.41.0 with only one month of data).

Why is it important?

The trend chart was cluttered with 30+ overlapping version lines, making it hard to read. Hiding older versions by default gives a cleaner view while still allowing users to inspect historical data on demand.

The tooltip bug meant the latest release was visible on the chart but absent from the hover popover, which was confusing — users could see the data point but had no way to identify its value.

@mdelapenya mdelapenya requested a review from a team as a code owner April 1, 2026 14:18
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 1, 2026

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit 81cf351
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-go/deploys/69cd291d42294b00087e5525
😎 Deploy Preview https://deploy-preview-3630--testcontainers-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 1, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4a78dd10-eefd-4d64-b931-2a6457249596

📥 Commits

Reviewing files that changed from the base of the PR and between 8bad03a and 81cf351.

📒 Files selected for processing (1)
  • docs/js/usage-metrics.js

Summary by CodeRabbit

  • New Features
    • Trend charts now display only the most recent data by default, with older versions remaining accessible through legend controls for a cleaner interface.
    • Improved tooltip interaction on charts for enhanced data exploration.

Walkthrough

A modification to the trend chart initialization in createTrendChart establishes a default visibility window displaying only the most recent 5 versions, with older datasets pre-marked as hidden. The tooltip interaction mode was adjusted from index-based to x-axis-based selection.

Changes

Cohort / File(s) Summary
Chart Visibility Configuration
docs/js/usage-metrics.js
Modified dataset initialization to hide older versions by default (keeping only the last 5 visible), and changed tooltip mode from 'index' to 'x' for x-axis-based value selection.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

📊 Five versions dance in the spotlight's gleam,
While older tales hide in shadow's dream,
Tooltips now glide along the x's way,
Legends still whisper what's hidden away,
A rabbit adjusts the chart's gentle display! 🐰✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mdelapenya mdelapenya added the chore Changes that do not impact the existing functionality label Apr 1, 2026
@mdelapenya mdelapenya merged commit d8db3d0 into testcontainers:main Apr 1, 2026
15 of 16 checks passed
@mdelapenya mdelapenya deleted the hide-old-versions branch April 1, 2026 14:19
mdelapenya added a commit that referenced this pull request Apr 3, 2026
* origin/main:
  chore(deps): bump github.com/moby/patternmatcher from 0.6.0 to 0.6.1 (#3628)
  chore(deps): bump github.com/shirou/gopsutil/v4 from 4.26.2 to 4.26.3 (#3627)
  chore: strip Gas Town overlay from CLAUDE.md (gt-p35)
  chore: add project instructions
  fix: auto-save uncommitted implementation work (gt-pvx safety net)
  fix(localstack): accept community-archive as a valid tag (#3601)
  chore!: migrate to moby modules (#3591)
  chore(deps): bump github.com/go-jose/go-jose/v4 in /modules/gcloud (#3632)
  chore(deps): bump actions/upload-artifact from 6.0.0 to 7.0.0 (#3625)
  fix(usage-metrics): include last release in the legend pop over (#3630)
  chore: update usage metrics (2026-04) (#3621)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Changes that do not impact the existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant